import request from '../request'

const Api = {
  yjLists: '/api/project/cjwt/yjLists',
  dataList: '/api/project/cjwt/dataList',
  save: '/api/project/cjwt/addData',
  remove: '/api/project/cjwt/remove',
  edit: '/api/project/cjwt/editData',
  upload: '/api/project/cjwt/importCommonProblemExcel',
}

/** 常见问题依据 */
export const yjLists = data => {
  return request.request({
    url: Api.yjLists,
    params: data,
    method: 'GET'
  })
}

/** 常见问题列表 */
export const dataList = data => {
  return request.request({
    url: Api.dataList,
    params: data,
    method: 'GET'
  })
}

/** 新增问题 */
export const save = data => {
  return request.request({
    url: Api.save,
    data: data,
    method: 'POST'
  })
}

/** 删除问题 */
export const remove = data => {
  return request.request({
    url: Api.remove,
    params: data,
    method: 'DELETE'
  })
}

/** 修改问题 */
export const edit = data => {
  return request.request({
    url: Api.edit,
    data: data,
    method: 'PUT'
  })
}

/** 问题导入 */
export const upload = data => {

}
